﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "ProjectSpaceType.h"
#include "GcmpCollaborationInterface.h"
#include "GbmpQuickCast.h"
#include "GbmpGuid.h"
#include "GcmpApiDeclaration.h"
#include <map>

namespace gcmp
{
    /// \brief 协同工程空间配置项接口
    ///
    /// 提供协同工程空间配置项类型等信息
    class GCMP_COLLABORATION_INTERFACE_EXPORT ICollaborationSpaceConfigurationItem 
    {
        DEFINE_CAST_BASE(gcmp::ICollaborationSpaceConfigurationItem);
    public:
        /// \brief  返回构件的ID,每个配置项对应了一个唯一的ID
        /// \return 返回的构件ID
        virtual std::wstring GetId() const = 0;

        /// \brief 获取协同工程空间配置类型
        /// \return 返回协同工程空间配置类型
        virtual ProjectSpaceType GetSpaceType() const = 0;

        /// \brief  配置项的名称
        /// \return 返回配置项的名称
        virtual std::wstring GetName() const = 0;


        /// \brief  配置项的值
        ///
        /// 部分项具有值，比如楼层具有高度。由调用者根据配置项解析字符串获取值。
        /// \return 返回配置项的键值的map，用键值“architectureLevel”获取建筑标高;
        ///  用键值“structureLevel”获取结构标高
        virtual std::map<std::wstring, std::wstring> GetValues() const = 0;

        /// \brief  配置项的描述信息
        /// \return 返回配置项的描述信息
        virtual std::wstring GetDescription() const = 0;

        /// \brief  配置项包含子配置项
        /// \return 返回所有的子配置项
        virtual std::vector<const ICollaborationSpaceConfigurationItem*> GetSubItems() const = 0;

        /// \brief 析构函数
        virtual ~ICollaborationSpaceConfigurationItem();
    };
}
